Calendar All Tests
Current file: /home/estudydev/workspace/eStudy_svn/web/calendar/classes/class.filter.inc.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
0.00 %0.00%
0.00% 0 / 39
 
Filter
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
0.00 %0.00%
0.00% 0 / 39
 public function showFilter($month, $year)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 21
 public function saveFilter($user = true, $team = true, $course = true, $foyer = true)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 18


       1                 : <?php                                                                                      
       2                 : /*--------------------------------------------------------------------------+              
       3                 : This file is part of eStudy.                                                               
       4                 : calendar/class.filter.inc.php                                                              
       5                 : - Modulgruppe:  Calendar                                                                   
       6                 : - Beschreibung: Klasse zum Filtern von Terminen                                            
       7                 : - Version:      $Id: class.filter.inc.php,v 1.4.20.3 2007/12/19 23:10:04 commana Exp $     
       8                 : - Autor(en):    Michel Krämer <michel.kraemer@mni.fh-giessen.de>                          
       9                 : +---------------------------------------------------------------------------+              
      10                 : This program is free software; you can redistribute it and/or                              
      11                 : modify it under the terms of the GNU General Public License                                
      12                 : as published by the Free Software Foundation; either version 2                             
      13                 : of the License, or any later version.                                                      
      14                 : +---------------------------------------------------------------------------+              
      15                 : This program is distributed in the hope that it will be useful,                            
      16                 : but WITHOUT ANY WARRANTY; without even the implied warranty of                             
      17                 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                              
      18                 : GNU General Public License for more details.                                               
      19                 : You should have received a copy of the GNU General Public License                          
      20                 : along with this program; if not, write to the Free Software                                
      21                 : Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.                
      22                 : +--------------------------------------------------------------------------*/              
      23                 : require_once (PATH_TO_ROOT."calendar/classes/class.template.inc.php");                     
      24                 : /**                                                                                        
      25                 :  * Klasse zum Filtern von Terminen                                                         
      26                 :  * @package eStudy.Calendar                                                                
      27                 :  * @author Michel Krämer <michel.kraemer@mni.fh-giessen.de>                               
      28                 :  * @version $Id: class.filter.inc.php,v 1.4.20.3 2007/12/19 23:10:04 commana Exp $         
      29                 :  */                                                                                        
      30                 : class Filter {                                                                             
      31                 :     public function showFilter($month, $year) {                                            
      32               0 :         $userenabled = "checked=\"checked\"";                                              
      33               0 :         $teamenabled = "checked=\"checked\"";                                              
      34               0 :         $courseenabled = "checked=\"checked\"";                                            
      35               0 :         $foyerenabled = "checked=\"checked\"";                                             
      36               0 :         if (isset($_SESSION['calendar_filter'])) {                                         
      37               0 :             if(strchr($_SESSION['calendar_filter'], 'u') === false) {                      
      38               0 :                 $userenabled = "";                                                         
      39               0 :             }                                                                              
      40               0 :             if (strchr($_SESSION['calendar_filter'], 't') === false) {                     
      41               0 :                 $teamenabled = "";                                                         
      42               0 :             }                                                                              
      43               0 :             if (strchr($_SESSION['calendar_filter'], 'c') === false) {                     
      44               0 :                 $courseenabled = "";                                                       
      45               0 :             }                                                                              
      46               0 :             if (strchr($_SESSION['calendar_filter'], 'f') === false) {                     
      47               0 :                 $foyerenabled = "";                                                        
      48               0 :             }                                                                              
      49               0 :         }                                                                                  
      50               0 :         $t = new Template(PATH_TO_ROOT."calendar/templates/filter.html");                  
      51               0 :         eval($t->GetTemplate());                                                           
      52               0 :     }                                                                                      
      53                 :     public function saveFilter($user = true, $team = true, $course = true, $foyer = true) {
      54               0 :         $f = "";                                                                           
      55               0 :         if(!$user && strlen($f) > 0) {                                                     
      56               0 :             $f.= ",";                                                                      
      57               0 :         }                                                                                  
      58               0 :         if ($user) {                                                                       
      59               0 :             $f.= "u";                                                                      
      60               0 :         }                                                                                  
      61               0 :         if ($team) {                                                                       
      62               0 :             $f.= "t";                                                                      
      63               0 :         }                                                                                  
      64               0 :         if ($course) {                                                                     
      65               0 :             $f.= "c";                                                                      
      66               0 :         }                                                                                  
      67               0 :         if ($foyer) {                                                                      
      68               0 :             $f.= "f";                                                                      
      69               0 :         }                                                                                  
      70               0 :         $_SESSION['calendar_filter'] = $f;                                                 
      71               0 :     }                                                                                      
      72                 : }                                                                                          
      73                 : ?>                                                                                         

Generated by PHPUnit 3.2.21 and Xdebug 2.0.3 at Thu Nov 26 17:01:15 CET 2009.